<?php
include("../../share/config.php");

$a = $_POST['et'];a
echo '<script type="text/javascript" >alert("error");<script/>';
$sql="SELECT * from cr where cr_id= '$cr_id' AND da = '$day'";
$result=mysqli_query($conn,$sql);
while($row = mysqli_fetch_array($result,MYSQLI_ASSOC)){
array_push($arr,$row['s_time'],$row['e_time']);
}
asort($arr);
$narr = array();
foreach($arr as $x=>$xv){
array_push($narr,$xv);
}

for($i=0;$i<count($narr);$i=$i+2){
	if($st<$narr[$i] && $et>$narr[$i+1]){
		echo '<script type="text/javascript" >alert("error");<script/>';
		
		break;
	}
}
mysqli_close($conn);

?>